The microcontroller is a device that is embedded in apparatus such as home electronics, audiovisual products, cellular phones, automobiles, and industrial machines, and it controls such apparatus by performing processing according to a program stored in a memory.
Because of the nature of the microcontroller embedded in apparatus for use, it is required to have necessary performance to control the apparatus as well as to be inexpensive. Further, the microcontroller is strongly required to be reliable enough to properly operate under an operating condition where operation is guaranteed.
Since the apparatus control has become more and more complicated and sophisticated in recent years, the amount of data processed by CPU has been increased, and capacity of the RAM embedded in the microcontroller has been also increased. On the other hand, miniaturization of the fabrication process and reductions in power supply voltage of the microcontroller have caused soft errors in which the charge of a memory device is temporarily inverted due to the influence from neutron radiation or the like. In particular, the RAM is more susceptible to a soft error than other devices due to its fineness. The data stored in the RAM contains important data that directly affects the control of the apparatus. Therefore, it is desirable to make the RAM less susceptible to the soft error.
ECC (Error Correcting Code) has been used as a technology for improving the reliability of RAM (for example, Japanese Patent Application Laid-Open Publication No. 9-288619 (Patent Document 1) and Japanese Patent Application Laid-Open Publication No. 5-88989 (Patent Document 2). ECC is a technology where, by adding a check bit to original data and then storing the data with the check bit, the original correct data can be restored when a one-bit error occurs, and when a two-bit error occurs, the original data cannot be restored but the occurrence of the error can be detected. In some apparatus required to have highly reliable data such as communications apparatus, the mirroring process where the RAM is multiplexed to store the same data in the plurality of RAMs, and data values are checked when the data is read is automatically performed by hardware.